package com.ciaojian.worker.strategy.workerstatus;

import com.ciaojian.core.model.Worker;

/**
 * 上下文类
 *
 * @author oxiny
 */
public class Context {
    private StatusModifier statusModifier;

    public Context(StatusModifier statusModifier) {
        this.statusModifier = statusModifier;
    }

    public StatusModifier getStatusModifier() {
        return statusModifier;
    }

    public void setStatusModifier(StatusModifier statusModifier) {
        this.statusModifier = statusModifier;
    }

    public void handle(Worker worker) {
        statusModifier.handle(worker);
    }
}

